﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="WebCallMsg.aspx.cs" Inherits="Web.WebCallMsg" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style>
        .keleyitable {
            width: 1200px;
        }

            .keleyitable table, td {
                padding: 5px 10px;
            }

            .keleyitable table, td, th {
                border: 1px dashed #808080;
                margin-top: 10px;
            }

        .klytd {
            width: 100px;
            text-align: right;
        }

        .hvttd {
            width: 500px;
        }
        #rows li{
            margin-top:10px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">




    <p style="padding: 10px 0px 10px 0px;">
        <asp:SiteMapPath ID="SiteMapPath1" runat="server" CssClass="sitmap"
            Style="font-family: 幼圆; font-size: medium" Font-Names="Verdana" Font-Size="0.8em" PathSeparator=" > ">
            <PathSeparatorStyle Font-Bold="True" ForeColor="#990000" />
            <CurrentNodeStyle ForeColor="#333333" />
            <NodeStyle Font-Bold="True" />
            <RootNodeStyle Font-Bold="True" />
        </asp:SiteMapPath>
    </p>

    <ul id="rows">
        <%foreach (var item in list) %>
        <%  { %>
        <li>
            <table style="width: 100%;">
                <tr>
                    <td class="klytd">留言时间：</td>
                    <td class="hvttd"><%=item.create_time.ToString("yyyy-MM-dd HH:mm:ss") %></td>
                </tr>
                <tr>
                    <td class="klytd">留言人：</td>
                    <td class="hvttd"><%=item.cient %></td>
                </tr>

                <tr>
                    <td class="klytd">内容：</td>
                    <td class="hvttd"><%=item.contents %></td>
                </tr>
                <tr>
                    <td class="klytd">回复：</td>
                    <td class="hvttd"><%=item.call_msg %></td>
                </tr>
            </table>
        </li>
        <%} %>

       
    </ul>

    <script src="js/jquery.form.js"></script>

    <form id="ly" style="margin-top:10px;">
        <input type="hidden" id="client_id" name="client_id" value="<%=clientId %>" />
        <input type="hidden" id="server_id" name="server_id" value="0" />
        <input type="hidden" id="create_time" name="create_time" value="<%=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") %>" />
        <input type="hidden" id="call_msg" name="call_msg" value="无" />
        <input type="hidden" id="Id" name="Id" value="0" />
        <table style="width: 100%;">

            <tr>
                <td class="klytd">留言人：</td>
                <td class="hvttd"><%=uname %></td>
            </tr>

            <tr>
                <td class="klytd">内容：</td>
                <td class="hvttd">
                    <textarea  id="contents" name="contents" style="width:100%;" rows="3"></textarea>
                </td>
            </tr>
           <tr >
               <td colspan="2">
                    <button type="submit" style="float:right;">提交</button>
               </td>
           </tr>
        </table>
       
    </form>
    <script>
        var options = {
            target: '#ly',
            success: suncess,
            url: "../Hanlder/Call_msgHandler.ashx?Method=Edit",
            type: "post",
            dataType: "json",
            timeout: 3000
        }
        $("#ly").ajaxForm(options);
        function suncess(data) {
            var res = data;

            if (res.states == "1") {
                alert(res.msg);
            }
            else {
                alert('留言成功');
                location.reload();
            }
        }
    </script>
    

   
 
    




</asp:Content>
